package com.example.score;

import com.alibaba.fastjson.parser.ParserConfig;
import org.apache.rocketmq.spring.support.RocketMQMessageConverter;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@MapperScan("com.example.score.mapper")
@EnableScheduling
public class ScoreAnalysisApplication {
    public static void main(String[] args) {
        SpringApplication.run(ScoreAnalysisApplication.class, args);
    }

    @Bean
    public RocketMQMessageConverter rocketMQMessageConverter() {
        RocketMQMessageConverter converter = new RocketMQMessageConverter();
        
        // 配置FastJson转换器
        ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
        
        return converter;
    }
} 